#include<iostream>
#include<vector>
using namespace std;
vector<int>ans;
int n;
int main()
{
	cin >> n;
	int cnt = 0;
	int sum = 0;
	for (int i = 1; i <= 7 * n; i++) {
		int x;
		cin >> x;
		cnt++;
		sum += x;
		if (cnt == 7) {
			ans.push_back(sum);
			sum = 0;
			cnt = 0;
		}
	}
	for (int x : ans) {
		cout << x << " ";
	}
	return 0;
}